/**
 * 
 */
package org.stars.database.connectionpool;

import java.sql.Connection;
import java.sql.SQLException;

import org.stars.database.ConnectionPool;

/**
 *	Connection pool disabilitato. Serve a gestire i connection pool disabilitati
 *	mediante l'attributo <code>enabled</code> impostato a <code>false</code>.
 *
 * @author Francesco Benincasa (908099)
 * @date 06/nov/07, 21:39:08
 *
 */
public class DisabledConnectionPool extends ConnectionPoolBase implements ConnectionPool {

	/* (non-Javadoc)
	 * @see it.insiel.database.ConnectionPool#getConnection()
	 */
	@Override
	public Connection getConnection() throws SQLException {
		throw(new SQLException("This connection pool is disabled!"));
	}
	
	/**
	 * nome del connection pool
	 */
	protected String name;

	/* (non-Javadoc)
	 * @see it.insiel.database.ConnectionPool#getName()
	 */
	@Override
	public String getName() {
		return name;
	}

	/* (non-Javadoc)
	 * @see it.insiel.database.ConnectionPool#setName(java.lang.String)
	 */
	@Override
	public void setName(String value) {
		name=value;
	}


}
